import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
import { UserService } from './user.service';
import { LoginDto } from './dto/login-user.dto';

@Controller('/user')
export class UserController {
  constructor(private readonly userService: UserService) {}

   @Post('/login')
   login(@Body() loginDto: LoginDto){
    return this.userService.login(loginDto);
   }

   @Post('/user/register')
   save(@Body() saveDto: LoginDto){
    return this.userService.save(saveDto);
   }

   @Post("/info")
   userInfo(){
    return this.userService.userInfo();
   }

   @Post("/loginOut")
   logout(){
    return this.userService.logout();
   }
}
